package sgbag1.Vues;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.Stroke;

import java.awt.geom.Point2D;

import javax.swing.JPanel;

public abstract class Vue extends JPanel {
    protected Shape boiteEnglobante;
    protected Point position;
    protected double tauxConversion;
    protected Point decalage = new Point(0, 0);

    public Vue(Point p) {
        super();
        this.position = p;
    }
    
    public Vue(){
        this(new Point(0, 0));
    }
    
    public void setTauxConversion(double t){
        tauxConversion = t;
    }
    
    public void setDecalage(Point p){
        decalage = new Point(p.x, p.y);
        decalage.x += 15;
    }

    /**
     * @param g
     */
    public void Dessiner(Graphics g) {
    }
    
    public Point2D GetPosition(){
        return position;
    }
    
    public void SetPosition(Point position){
        this.position = position;
    }

    public boolean IsClicked(int x, int y) {
        return boiteEnglobante.contains(x, y);
    }

    public abstract void CalculerBoiteEnglobante();
}
